﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tetris
{
    class Frame
    {
        private int width;
        private int height;

        public Frame(GameField field)
        {
            Width = field.Width + 2;
            Height = field.Height + 2;
        }

        public int Width
        {
            get
            {
                return width;
            }
            set
            {
                if (value <= 0)
                {
                    throw new Exception("incorrect entedred width of frame.");
                }
                width = value;
            }
        }

        public int Height
        {
            get
            {
                return height;
            }
            set
            {
                if (value <= 0)
                {
                    throw new Exception("incorrect entedred height of frame.");
                }
                height = value;
            }
        }

    }
}
